<?php

namespace app\api\service;
use app\store\model\Banner;

class BannerService
{
    public static function getBannerList($store_id)
    {
       $banners = Banner::field('image,type,param')
                        ->where(['store_id' => $store_id])
                       ->withAttr('image',function ($value){
                           return request()->domain() . $value;
                       })->order('sort','asc')
                      ->select();

       return $banners;
    }
}